home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
menus
/
popupf
/
frustrat.frm
< prev
next >
Wrap
Text File
|
1995-03-09
|
4KB
|
182 lines
VERSION 2.00
Begin Form Form1
BorderStyle = 3 'Fixed Double
Caption = "Frustration!"
ClientHeight = 3780
ClientLeft = 1110
ClientTop = 1545
ClientWidth = 3285
Height = 4470
Icon = FRUSTRAT.FRX:0000
Left = 1050
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3780
ScaleWidth = 3285
Top = 915
Width = 3405
Begin Label Label3
Caption = "Read the READ.ME file included in this project to understand how to activate the problem..."
Height = 675
Left = 120
TabIndex = 2
Top = 3060
Width = 3015
End
Begin Label Label2
Alignment = 2 'Center
BackColor = &H000000FF&
BorderStyle = 1 'Fixed Single
Caption = "Popup Menu5"
ForeColor = &H00FFFFFF&
Height = 1335
Left = 120
TabIndex = 1
Top = 1560
Width = 3015
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00800000&
BorderStyle = 1 'Fixed Single
Caption = "Popup Menu4"
ForeColor = &H00FFFFFF&
Height = 1395
Left = 120
TabIndex = 0
Top = 120
Width = 3015
End
Begin Menu Menu1
Caption = "Menu 1"
Begin Menu Menu11
Caption = "Make Menu 2 Visible"
Enabled = 0 'False
End
Begin Menu Menu12
Caption = "Pop-up Menu 2"
End
Begin Menu mSep
Caption = "-"
End
Begin Menu mExit
Caption = "E&xit"
End
End
Begin Menu Menu2
Caption = "Menu 2"
Begin Menu Menu21
Caption = "Menu 2.1"
End
Begin Menu Menu22
Caption = "Make Menu 2 Invisible"
End
End
Begin Menu Menu3
Caption = "Menu 3"
Begin Menu Menu31
Caption = "Menu 3.1"
End
Begin Menu Menu32
Caption = "Menu 3.2"
End
End
Begin Menu Menu4
Caption = "Menu 4 (Invis. Popup)"
Visible = 0 'False
Begin Menu Menu41
Caption = "Menu 4.1"
End
Begin Menu Menu42
Caption = "Menu 4.2"
End
Begin Menu Menu43
Caption = "Menu 4.3"
End
End
Begin Menu Menu5
Caption = "Menu 5 (Invis. Popup)"
Visible = 0 'False
Begin Menu Menu51
Caption = "Menu 5.1"
End
Begin Menu Menu52
Caption = "Menu 5.2"
End
End
End
Option Explicit
Sub Form_Load ()
Left = (Screen.Width - Width) \ 2
Top = (Screen.Height - Height) \ 2
End Sub
Sub Label1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button = 2) Then
PopupMenu Menu4
End If
End Sub
Sub Label2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button = 2) Then
PopupMenu Menu5
End If
End Sub
Sub Menu11_Click ()
Menu2.Visible = True
Menu11.Enabled = False
Menu22.Enabled = True
End Sub
Sub Menu12_Click ()
PopupMenu Menu2
End Sub
Sub Menu21_Click ()
MsgBox "Menu 2.1"
End Sub
Sub Menu22_Click ()
MsgBox "Menu 2.2: Menu 2 will be invisible now."
Menu11.Enabled = True
Menu22.Enabled = False
Menu2.Visible = False
End Sub
Sub Menu41_Click ()
MsgBox "Menu 4.1!"
End Sub
Sub Menu51_Click ()
MsgBox "Menu 5.1!"
End Sub
Sub mExit_Click ()
Unload Me
End
End Sub